#include "AllHeader.h"
inline double Radians(double degrees)
{
    return (degrees * Pi / 180);
}
inline double Degrees(double radians)
{
	return (radians * 180 / Pi);	
}
inline bool inBox(double x, double y, double x1, double x2, double y1, double y2)
{
	return (x >= x1 && x <= x2 && y >= y1 && y <= y2);
}
inline bool inCircle(double x, double y, double cx, double cy, double r)
{
	return (sqrt((x - cx) * (x - cx) + (y - cy) * (y - cy)) <= r);
}
inline void MoveDirectionPen(double distance, double direction)
{
	MovePen(GetCurrentX() + distance * cos(Radians(direction)), GetCurrentY() + distance * sin(Radians(direction)));
	return ;
}
inline double GetDist2(double x1, double y1, double x2, double y2)
{
	return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
inline double sign(double x)
{
	if(x > 0.0){
		return 1.0;
	}
	else{
		return -1.0;
	}
}

